import axios from 'axios';
if (process.env.NODE_ENV === "development") {
	//alert("开发环境");
} else {
	//alert("生产环境");
	axios.defaults.baseURL = 'https://way.jd.com/he/'
}


const api = {
	getcityJson() {
		//https://www.mxnzp.com/api/address/list?app_id=rgihdrm0kslojqvm&app_secret=WnhrK251TWlUUThqaVFWbG5OeGQwdz09
		return axios.get(
			'./static/json/juheCity.json'
		)
	},
	getweatherJson(params) {
		return 'https://way.jd.com/he/freeweather?city=' + params.params +
			'&appkey=da39dce4f8aa52155677ed8cd23a6470'
	},
	getweatherJson1(params) {
		//https://way.jd.com/he/
		return axios.get('/freeweather?city=' + params.params +
			'&appkey=da39dce4f8aa52155677ed8cd23a6470')
	}
}

export default api;
